<template>
  <div>
  <HomeHeader></HomeHeader>
  <HomeSwiper></HomeSwiper>
  <HomeIcons></HomeIcons>
  <HomeRecommend></HomeRecommend>
  <HomeWeekend></HomeWeekend>
  
  </div>
</template>

<script>
import HomeHeader from './components/Header.vue'
import HomeSwiper from './components/Swiper.vue'
import HomeIcons from './components/icons.vue'
import HomeWeekend from './components/Weekend.vue'
import HomeRecommend from './components/Recommend.vue'
import axios from 'axios'
export default {
  name: 'Home',
  components: {
  	HomeHeader,
  	HomeSwiper,
  	HomeIcons,
    HomeRecommend,
    HomeWeekend //注意Vue大项目里这种传递的都是局部组件，记得声明
  },
  methods: {
    getHomeInfo () {
      axios.get('/api/index.json').then(this.getHomeInfoSucc)
    },
    getHomeInfoSucc (res) {
      console.log(res)
    }
  },
  mounted () {
    this.getHomeInfo()
  },
}
</script>

<style>

</style>
